<!DOCTYPE HTML>
<html class="portal-body">
<head>
	<meta charset="utf-8">
	<meta name="renderer" content="webkit|ie-comp|ie-stand">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
	<meta http-equiv="Cache-Control" content="no-siteapp" />
	<LINK rel="Bookmark" href="/favicon.ico" />
	<LINK rel="Shortcut Icon" href="/favicon.ico" />
	<!-- 提高低版本兼容性的js.只有在对应版本才会加载 -->	
	<!--[if lt IE 9]>
	<script type="text/javascript" src="../lib/html5.js"></script>
	<script type="text/javascript" src="../lib/respond.min.js"></script>
	<script type="text/javascript" src="../lib/PIE_IE678.js"></script>
	
	
	<![endif]-->
	<!--[if IE 6]>
	<script type="text/javascript" src="../lib/DD_belatedPNG_0.0.8a-min.js" ></script>
	<script>DD_belatedPNG.fix('*');</script>
	<![endif]-->
	<!-- 提高低版本兼容性的js.只有在对应版本才会加载 -->

	<!--<script type="text/javascript" src="../lib/es5-shim.min.js"></script>
	<script type="text/javascript" src="../lib/es5-sham.min.js"></script>
	<script type="text/javascript" src="../lib/json3.min.js"></script>-->
	<title>portal</title>
	<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
	<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" >
	<!-- 项目的样式 -->
	<link rel="stylesheet" href="../css/mars.css">

	<script src="../lib/jquery.min.js"></script>
	<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
	<!-- <script src="http://cdn.bootcss.com/bootstrap-hover-dropdown/2.0.10/bootstrap-hover-dropdown.min.js"></script>-->
</head>

<body >
	<div id="portal-panel" class="portal-panel-miniSize">
		<div id="portal-header">
			<nav class="navbar navbar-default">
			  <div class="container-fluid">
			    <!-- Brand and toggle get grouped for better mobile display -->
			    <div class="navbar-header">
			      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#header-navbar-collapse-1" aria-expanded="false">
			        <span class="sr-only">切换</span>
			        <span class="icon-bar"></span>
			        <span class="icon-bar"></span>
			        <span class="icon-bar"></span>
			      </button>
			      <a class="navbar-brand" href="#"><img src="../images/logo.png" />项目名称</a>
			    </div>

			    <!-- 一级导航栏 -->
			    <div class="collapse navbar-collapse" id="header-navbar-collapse-1">
			      <ul id="headerNav_lv1" class="nav navbar-nav" style="opacity:0;position:absolute">
			        <li id="headerNav_index" class="active"><a _href="test.html" data-title="首页" href="javascript:void(0)" class="iframe-href">首页</span></a></li>
			        
			       
			        <li id="headerNavMore" class="dropdown hover-open" style="display:none">
			          <a href="#" class="dropdown-toggle" data-hover="dropdown" data-toggle="dropdown" role="button" aria-haspopup="true"  aria-expanded="false">更多 <span id="_caret"><i class="icon iconfont icon-right"></i></span></a>
			          <ul class="dropdown-menu"></ul>
			        </li>
			      </ul>
			      
			      <!-- 右侧导航 -->
			      <ul id="headerNav_right" class="nav navbar-nav navbar-right">
			        <li><a href="#"><span class="glyphicon glyphicon-bell" aria-hidden="true"></span></a></li>
			        <li class="dropdown hover-open">
			          <a href="#" class="dropdown-toggle" data-toggle="dropdown"  data-hover="dropdown"  role="button" aria-haspopup="true" aria-expanded="false">admin <span class="caret"></span></a>
			          <ul class="dropdown-menu">
			            <li><a href="#">设置</a></li>
			            <li><a href="#">修改密码</a></li>
			            
			            <li role="separator" class="divider"></li>
			            <li><a href="#">退出</a></li>
			          </ul>
			        </li>
			      </ul>
					
				  <!-- 搜索 -->
			      <form id="headerNav_search" class="navbar-form navbar-right">
			        <div class="form-group">
			          <input type="text" class="form-control" placeholder="Search...">
			        </div>
			        <button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-search" aria-hidden="true"></span></button>
			      </form>


			    </div><!-- /.navbar-collapse -->
			  </div><!-- /.container-fluid -->
			</nav>

		</div>
		<div id="portal-content" class="">
			<div id="portal-side" class="portal-side scroll-wrapper">
				<div class="scroller">
					<div class="sidebar-box">
					</div>
				</div>
			</div>
			<div id="portal-detail" class="portal-detail">
				<!-- 导航栏 -->
				<div id="portal-tabNavbar" class="portal-tabNavbar">
					<!-- 页面切换按钮 -->
					<a href="javascript:void(0)" id="portal-toggle" title="切换" class="portal-toggle"><span class="iconfont icon-list"></span></a>
					
					 <!-- =设置的默认首页 -->
					<div class="portal-tabNav-wp">
						<ul id="min_title_list" class="portal-tabNav acrossTab">
							<!-- 首页 -->
							<li class="active"><span title="首页" data-href="welcome.html">首页</span><em></em></li>
						</ul>
					</div>
					<!-- =设置的默认首页 -->
					
					
					
					<!-- 显示不全时的按钮 -->
					<div class="btn-group portal-tabNav-more  btn-group-xs" role="group">
					  <button id="portal-tabNav-prev"  type="button" class="btn btn-default"><span class="glyphicon glyphicon-triangle-left"></span></button>
					  <button  id="portal-tabNav-next"  type="button" class="btn btn-default"><span class="glyphicon glyphicon-triangle-right"></span></button>
					  <button title="全屏切换" id="portal_fullToggle"  type="button" class="btn btn-default"><i class="icon iconfont icon-fullpage"></i></button>

					  <div class="btn-group btn-group-xs" role="group">
					    <button type="button" class="btn btn-default dropdown-toggle dropdown-hover" data-toggle="dropdown" data-hover="dropdown" aria-haspopup="true" aria-expanded="false">
					      
					      <span class="caret"></span>
					    </button>
					    <ul id="portal_close_btns" class="dropdown-menu dropdown-menu-right">
					      <!-- <li><a id="portal_fullToggle" href="javascript:void(0)">全屏</a></li> -->
					      <li><a id="portal_closeCur" href="javascript:void(0)">关闭当前页面</a></li>
					      <li><a id="portal_closeLeft" href="javascript:void(0)">关闭左侧页面</a></li>
					      <li><a id="portal_closeRight" href="javascript:void(0)">关闭右侧页面</a></li>
					      <li><a id="portal_closeOther" href="javascript:void(0)">关闭其他页面</a></li>
					      <li><a id="portal_closeAll" href="javascript:void(0)">关闭全部页面</a></li>
					    </ul>
					  </div>
					</div>
					<!-- 显示不全时的按钮 -->
					

				</div>
				<!-- 导航栏 -->


				<!-- 页面显示区域 -->
				<div class="portal-view">
					<div id="portal-pages" class="portal-pages">
						<div class="portal-page active">
							<div style="display:none" class="loading"></div>
							<!-- =设置的默认首页的链接 -->
							<iframe scrolling="yes" frameborder="0" src="welcome.html"></iframe>
						</div>
					</div>
				</div>
				
			</div>
		</div>
	</div>
	
	<!-- 一级导航模板 -->
	<script id="_nav_lv1" type="text/html">
		{{each data as list i}}
		{{if list.nav}}
		<li><a _href="{{list.url}}" data-id="{{list.id}}" data-index="{{i}}" data-title="{{list.title}}" href="javascript:void(0)" class="hasChild">{{list.title}}</a></li>
		{{else}}
		<li><a _href="{{list.url}}" data-id="{{list.id}}" data-index="{{i}}" data-title="{{list.title}}" href="javascript:void(0)" class="iframe-href">{{list.title}}</a></li>
		{{/if}}
		{{/each}}

	</script>
	<!-- 二级导航模板 -->
	<script id="_nav" type="text/html">
		{{each data as list i}}
		<div class="sidebar">
			{{if list.nav}}
			<a href="javascript:void(0);" title="{{list.title}}" class="sidebar-link hasChild">
			{{else}}
			<a href="javascript:void(0);" _href="{{list.url}}" data-title="{{list.title}}" title="{{list.title}}" class="sidebar-link iframe-href">
			{{/if}}
				<div class="sidebar-icon"><i class="icon iconfont icon-layers"></i></div>
				<span class="sidebar-text">{{list.title}}</span>
				<span class="sidebar-arr"><i class="icon iconfont icon-left"></i></span>
			</a>
			<div class="sidebar-children">
				<ul>
					{{if list.nav}}
						{{include '_nav_children' list}}
					{{/if}}
				</ul>
			</div>
		</div>
		{{/each}}
	</script>
	
	<!-- 三级导航子模板 -->
	<script id="_nav_children" type="text/html">
		{{each nav as list i}}
		<li><a _href="{{list.url}}" data-id="{{list.id}}" title="{{list.title}}"  data-title="{{list.title}}" href="javascript:void(0)" class="iframe-href">{{list.title}}</a></li>
		{{/each}}
	</script>

	<!-- 入口js -->
	<script src="../lib/require.js" defer async="true" data-main="../js/app.js"></script>

	<script>
	var test = function(){
		var data = {}
		var t = template('_nav',data);
			
	}

	/*打开新页面方法*/
	/*
		
		方法1: 直接通过 链接的方法点击打开,参考:
		<a href="javascript:void(0);" _href="{{list.url}}" data-title="{{list.title}}" title="{{list.title}}" class="iframe-href">

		方法2: 通过JS打开parent._createPage(href,titleName)

		方法3: 子页面打开新页面 window.parent._createPage(href,titleName)

		
		
	*/


	/*

		在子页面调用关闭页面方法
		window.parent._removePage(pagename,callback,params)
		旧的方法名removeIframe
		window.parent.removeIframe(pagename,callback,params)

		传入参数(参数均为未必要参数,什么都不传.则关闭后打开上一个tab):
			pagename:关闭页面后,跳转到的tab的标题
			callback:跳转到后,需要执行的回调函数 *非必要
			params:回调函数的传参 *非必要 暂时只支持传一个参数,

	*/
		var testOpen  = function (){
				_createPage('http://www.163.com','网易');
		}

	</script>
</body>
</html>